package hoyo.zqy.org.mapper;

import hoyo.zqy.org.domain.Shop;
import hoyo.zqy.basic.mapper.BaseMapper;
import hoyo.zqy.org.dto.ShopDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zqy
 * @since 2022-11-01
 */
public interface ShopMapper extends BaseMapper<Shop> {

    /**
     * 获取店铺名称
     * @param shop
     * @return
     */
    Shop loadByName(Shop shop);

    /**
     * 修改状态
     * @param shopId
     * @param i
     */
    void updateState(@Param("id")Long shopId,@Param("state") int i);

    /**
     * 店铺数量
     * @return
     */
    List<ShopDto> echarts();
}
